#ifndef __GuiApi_H__
#define __GuiApi_H__
#include "vmsys.h"

#define MMI_SOFTKEY_QCIF_HEIGHT		30
#define MMI_SOFTKEY_QVGA_HEIGHT		30

enum
{
	ALIGN_MODE_START = 0,
	ALIGN_LEFT_MODE = ALIGN_MODE_START,
	ALIGN_CENTER_MODE,
	ALIGN_RIGHT_MODE,

	ALIGN_MODE_END
};

extern VMINT GetSoftkeyHeight(void);









#define V_RGB(r, g, b) ((((r & 0xf8) + ((g & 0xe0) >> 5)) << 8) + ((g & 0x1c) \
<< 3) + (b >> 3))

#define RECT_CORNER_WIDTH	5

#define COLOR_RECT_FOCUSED	V_RGB(50, 240, 255)

#define COLOR_RECT_FILL		V_RGB(254, 254, 254)

extern void RefreshScreenByColor(VMBYTE* frame_buf, VMUINT16 color);

extern void DrawImage(VMBYTE* frame_buf, VMSTR name, VMINT x, VMINT y, VMINT width, VMINT height);

extern void DrawImageDirect(VMBYTE* frame_buf, VMUINT8* img, VMINT x, VMINT y, VMINT width, VMINT height);

extern void DrawText(VMBYTE* frame_buf, VMSTR text, VMINT x, VMINT y, VMUINT16 color);

extern void DrawTextUCS2(VMBYTE* frame_buf, VMWSTR text, VMINT x, VMINT y, VMUINT16 color);

extern void DrawTextAlignment(VMBYTE* frame_buf, VMSTR text, VMINT x, VMINT y, VMINT width, VMUINT16 color, VMINT alignment);

extern void DrawTextUCS2Alignment(VMBYTE* frame_buf, VMWSTR text, VMINT x, VMINT y, VMINT width, VMUINT16 color, VMINT alignment);

extern void DrawRoundRect(VMBYTE* frame_buf, VMINT x, VMINT y, VMINT width, VMINT height, VMINT corner_width, VMINT border_width, VMUINT16 border_color, VMINT bg_color);

extern void DrawFillRect(VMBYTE* frame_buf, VMINT x, VMINT y, VMINT width, VMINT height, VMUINT16 line, VMUINT16 back);

#endif
